<%--
  Created by IntelliJ IDEA.
  User: fan
  Date: 2022/9/7
  Time: 17:46
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="ftm" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>项目相关所有信息</title>
</head>
<body>
    <table>
        <tr align="center" width="80%" border="1px" bgcolor="#fff8dc">
            <th>项目编号</th>
            <th>项目名称</th>
            <th>项目开始时间</th>
            <th>项目结束时间</th>
            <th>项目更新时间</th>
            <th>开发商名称</th>
            <th>承建商名称</th>
            <th>工程阶段</th>
            <th>开发商部门</th>
            <th>分项工程</th>
            <th>项目状态</th>
            <th>操作</th>
        </tr>
        <c:forEach items="${projects}" var="project">
            <tr>
                <td>${project.pid}</td>
                <td>${project.pname}</td>
                <td><ftm:formatDate value="${project.starttime}" pattern="yyyy-MM-dd"></ftm:formatDate> </td>
                <td><ftm:formatDate value="${project.endtime}" pattern="yyyy-MM-dd"></ftm:formatDate> </td>
                <td><ftm:formatDate value="${project.updatetime}" pattern="yyyy-MM-dd"></ftm:formatDate> </td>
                <td>${project.developer.dname}</td>
                <td>${project.contractor.cname}</td>
                <td>
                    <c:forEach items="${project.stages}" var="stage">
                        <a href="/stage/findStageBySname?sname=${stage.sname}">${stage.sname}&nbsp;&nbsp;</a>
                    </c:forEach>
                </td>
                <td>
                    <c:forEach items="${project.branches}" var="branch">
                        <a href="/branch/findBranchByBname?bname=${branch.bname}">${branch.bname}&nbsp;&nbsp;</a>
                    </c:forEach>
                </td>
                <td>
                    <c:forEach items="${project.subitems}" var="subitem">
                        <a href="/subitem/findSubitemBySname?sname=${subitem.sname}">${subitem.sname}&nbsp;&nbsp;</a>
                    </c:forEach>
                </td>
                <td>${project.status}</td>
                <td>修改
                    &nbsp;&nbsp;
                    删除
                </td>
            </tr>
        </c:forEach>
    </table>

</body>
</html>
